package sctu.edu.java.year2016.team03.huangbaolian.exiercise.d20160602;

import java.util.*;

/**
 * Created by hbl on 2016/6/7.
 */
public class MySet {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("k");
        list.add("e");
        list.add("a");
        list.add("a");
        Set<String> set = new HashSet<String>();
        set.addAll(list);
        Iterator<String> iterator = set.iterator();
        while (iterator.hasNext())
        System.out.print(iterator.next());

        Map<String,String> map = new HashMap<String ,String>();
        map.put("1","f");
        map.put("2","g");
        System.out.println();
        for(int i = 1;i<3;i++){
            System.out.print(map.get(""+i+""));
        }

    }
}
